package dal.datastore;

import java.util.ArrayList;
import java.util.Collection;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonParser;
import com.sun.org.apache.bcel.internal.generic.Type;

public class test {
	static class Event {
		private String name;
		private String source;

		private Event(String name, String source) {
			this.name = name;
			this.source = source;
		}

		@Override
		public String toString() {
			return String.format("(name=%s, source=%s)", name, source);
		}
	}

	@SuppressWarnings("unchecked")
	public static void main(String[] args) {
//		Gson gson = new Gson();
//		Collection collection = new ArrayList<>();
//		ArrayList columns = new ArrayList();
//		columns.add(new Column("col1", "int"));
//		columns.add(new Column("Col2", "String"));
//		ArrayList tables = new ArrayList();
//		tables.add(new Table("table1", columns));
//		tables.add(new Table("Tabl2", columns));
//
//		collection.add(new Database("DB1", tables));
//		String json = gson.toJson(collection);
//		System.out.println(json);
//
//		JsonParser parser = new JsonParser();
//		JsonArray array = parser.parse(json).getAsJsonArray();
//		Database db = gson.fromJson(array.get(0), Database.class);
//		System.out.println(db);

		PhysicalDataManipulation dao = new PhysicalDataManipulation();
		try {
			dao.createDatabase(null);
		} catch (Exception e) {
			
		}		
	}
}
